package edu.nf.llmtest.web;

import edu.nf.llmtest.common.VO.ResultVO;
import edu.nf.llmtest.common.base.BaseController;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import edu.nf.llmtest.service.fileService;
import org.springframework.web.multipart.MultipartFile;

/**
 * @ Author bin
 * @ Create  2025/11/24 10:55
 **/
@RestController
@RequestMapping("/file")
@RequiredArgsConstructor
public class FileController extends BaseController {
    private final fileService fileService;

    @RequestMapping("/upload")
    public ResultVO<String> upload(MultipartFile file){
        return success(fileService.uploadFile(file));
    }

    @RequestMapping("/uploads")
    public ResultVO<String> uploads(MultipartFile[] files){
        return success(fileService.uploadFiles(files));
//        return success();
    }
}
